package com.mgkj.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author : ssy
 * @date: 2024-02-28
 * @Description:
 */
@Data
@Api(tags = "进货单单身Dto")
public class PURTHDto implements Serializable {

    @ApiModelProperty(value = "到货检验单号",required = true)
    private String dhjydh;

    @ApiModelProperty(value = "到货检验单别",required = true)
    private String dhjydb;

    @ApiModelProperty(value = "序号",required = true)
    private String xh;

    @ApiModelProperty(value = "工厂")
    private String factory;

    @ApiModelProperty(value = "检验批次",required = true)
    private String jypc;

    @ApiModelProperty(value = "检验批号")
    private String jyph;

    @ApiModelProperty(value = "检验数量",required = true)
    private Double jysl;

    @ApiModelProperty(value = "检验包装数量")
    private Double jybzsl;

    @ApiModelProperty(value = "备注")
    private String bz;

    @ApiModelProperty(value = "库位编号")
    private String kw;

    @ApiModelProperty(value = "仓库编号")
    private String cw;

    @ApiModelProperty(value = "单别",required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TH001")
    private String TH001;

    @ApiModelProperty(value = "单号",required = true)
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TH002")
    private String TH002;

    @ApiModelProperty(value = "序号",required = true)
    @NotBlank(message = "序号不能为空")
    @JsonProperty("TH003")
    private String TH003;

    @ApiModelProperty(value = "品号",required = true)
    @NotBlank(message = "品号不能为空")
    @JsonProperty("TH004")
    private String TH004;

    @ApiModelProperty(value = "进货数量",required = true)
    @DecimalMin(value = "0.01",message = "不许小于0")
    @JsonProperty("TH007")
    private Double TH007;

    @ApiModelProperty(value = "单位", required = true)
    @NotEmpty(message = "带你为不能为空")
    @JsonProperty("TH008")
    private String TH008;

    @ApiModelProperty(value = "仓库", required = true)
    @NotBlank(message = "仓库不能为空")
    @JsonProperty("TH009")
    private String TH009;

    @ApiModelProperty(value = "采购单别",required = true)
    @NotBlank(message = "采购单别不能为空")
    @JsonProperty("TH011")
    private String TH011;

    @ApiModelProperty(value = "采购单号",required = true)
    @NotBlank(message = "采购单号不能为空")
    @JsonProperty("TH012")
    private String TH012;

    @ApiModelProperty(value = "采购序号",required = true)
    @NotBlank(message = "采购序号不能为空")
    @JsonProperty("TH013")
    private String TH013;

    @ApiModelProperty(value = "验收日期",required = true)
    @NotBlank(message = "签收日期不能为空")
    @JsonProperty("TH014")
    private String TH014;

    @ApiModelProperty(value = "验收数量",required = true)
    @DecimalMin(value = "0.01",message = "不许小于0")
    @JsonProperty("TH015")
    private Double TH015;

    @ApiModelProperty(value = "计价数量",required = true)
    @DecimalMin(value = "0.01",message = "不许小于0")
    @JsonProperty("TH016")
    private Double TH016;

    @ApiModelProperty(value = "检验状态",required = true)
    @NotBlank(message = "检验状态不能为空")
    @JsonProperty("TH028")
    private String TH028;

    @ApiModelProperty(value = "审核码",required = true)
    @Pattern(regexp = "^[NY]$",message = "只允许输入N|Y")
    @JsonProperty("TH030")
    private String TH030;
}
